
import java.util.Arrays;
import java.util.Scanner;
public class Test {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s1 = sc.nextLine();
        String s2 = sc.nextLine();
        int lg = (s1.length() > s2.length() ? s1.length() + 1 : s2.length() + 1);
        int ls = (s1.length() < s2.length() ? s1.length() : s2.length());
        int[] arr = new int[lg];
        int k = 0;
        int tmp = 0;

        if(s1.length()==1&&s2.length()==1){
            int a = s1.charAt(0) - '0';
            int b = s2.charAt(0) - '0';
            arr[k] = (a + b + tmp) % 10;
            tmp = (a + b + tmp) / 10;
            if(tmp==1){
                k++;
                arr[k]=1;
            }
            for (int i =k; i >=0; i--) {
                System.out.print(arr[i]);
            }
            return;

        }else{
            for (int i = s1.length() - 1, j = s2.length() - 1; k < ls; k++, i--, j--) {
                int a = s1.charAt(i) - '0';
                int b = s2.charAt(j) - '0';
                arr[k] = (a + b + tmp) % 10;
                tmp = (a + b + tmp) / 10;
            }
            if (s1.length() > s2.length()) {
                for (int i = s1.length()-1-k; i >=0; i--) {
                    int a = s1.charAt(i) - '0';
                    arr[k] = (a + tmp) % 10;
                    if((a+tmp)/10>0){
                        tmp=1;
                    } else{
                        tmp=0;
                    } k++;
                    if(i==0&&tmp==1){
                        arr[k]=1;
                    }

                }
            } else {
                for (int i = s2.length()-1-k; i >=0; i--) {
                    int a = s2.charAt(i) - '0';
                    arr[k] = (a + tmp) % 10;
                    if((a+tmp)/10>0){
                        k++;
                        arr[k]=1;
                    }
                    tmp = 0;
                    k++;
                }
            }
        }
        for (int i =k; i >=0; i--) {
            if(i==k){
                if(arr[i]==0){
                    continue;
                }
            }
            System.out.print(arr[i]);
        }
    }

    public static void zhuanHuan2(int n){
        if(n==0){
            return;
        }
        zhuanHuan2(n/2);
        System.out.print(n%2);
    }

    public static void zhuanHuan16(int n){
        if(n==0){
            return;
        }

        zhuanHuan16(n/16);
        if(n%16>9&&n%16<16){
            char ch='a';
            int sac=n%16-10;
            ch+=sac;
            System.out.print(ch);
            return;
        }

        System.out.print(n%16);
    }
    public static void zhuanHuan8(int n){
        if(n==0){
            return;
        }
        zhuanHuan8(n/8);
        System.out.print(n%8);
    }
    public static void main1(String[] args) {
        Scanner sc=new Scanner(System.in);
        while(sc.hasNextInt()){
            int n=sc.nextInt();
            if(n==0){
                System.out.println("0 0 0");
                return;
            }
            zhuanHuan2(n);
            System.out.print(" ");
            zhuanHuan8(n);
            System.out.print(" ");
            zhuanHuan16(n);
        }
    }
}
